 <!DOCTYPE html>
 <html lang="en">
 <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <title>Document</title>
    <style>
        body {
        background-image: url("../img/15645.jpg");
        background-position: center 0;
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-size: cover;
        -webkit-background-size: cover;
        -o-background-size: cover;
        -moz-background-size: cover;
        -ms-background-size: cover;
        }
         
        #login_box {
            width: 40%;
            height: 400px;
            background-color: #00000085;
            margin: auto;
            margin-top: 10%;
            text-align: center;
            border-radius: 10px;
            padding: 50px 50px;
        }
        
        #login_box input,
        #login_box button {
            outline: none;
        }
        
        #login_box h2 {
            color:#ffffff90;
            margin-top: 5%;
        }
        
        #login_box #form #input_box {
            margin-top: 5%;
        }
        
        #login_box #form #input_box input {
            border: 0;
            width: 60%;
            font-size: 15px;
            color: #ffffff;
            background: #ffffff00;
            border-bottom: 2px solid #ffffff;
            padding: 5px 10px;
            margin-top: 10px;
        }
        
        #login_box button {
            margin-top: 50px;
            width: 50%;
            height: 30px;
            border-radius: 10px;
            border: 0;
            color: #fff;
            font-size: 15px;
            background-image: linear-gradient(120deg, #f093fb 0%, #f5576c 100%);
            cursor: pointer;
        }
 
    </style>
 </head>
 <body>  
      <div id="login_box">
        <h2>登 录</h2>
        <div id="form">
            <div id="input_box">
                <input type="text" placeholder="请输入用户名"id="username">
            </div>
            <div id="input_box">
                <input type="password" placeholder="请输入密码"id="password">
            </div>
        </div>
        <button type="button"name="chkBtn"id="chkBtn">登录</button>
        <br>
        <a href="注册.html"><button id="enroll">注册</button></a>
       
    </div>
    <script type="text/javascript">
			
			document.getElementById('chkBtn').addEventListener('click',function(){ //登陆判断
				let username = document.getElementById('username').value;
				let password = document.getElementById('password').value;
				
					if (username == "123" && password == "123") {
						alert('登录成功')
						window.location.href="1564.html"
					} 
					
					else {
						alert('密码错误');
					}
			
			})
                </script>
       
 

 </body>
 </html>